<!--注册开放设置-->

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		
			<link rel="stylesheet" href="/static/css/backstage/amazeui.min.css" >
		<link rel="stylesheet" href="/static/css/backstage/admin.css" >
		<link rel="stylesheet" href="/static/css/backstage/app.css" >
		<style>
			.admin-main{
				padding-top: 0px;
			}
		</style>
	</head>
	<body>

		<div class="am-cf admin-main">
			<!-- content start -->
			<div class="admin-content">
				<div class="admin-content-body">
					<div class="am-g">
						<form class="am-form am-form-horizontal" action="#" method="post" style="padding-top: 30px;">
							<input value="504" name="roleId" type="hidden">
							<div class="am-form-group">
								<label for="user-name" class="am-u-sm-3 am-form-label">
									当前状态
								</label>
								#if(resigter.r_flag==1)
								<div class="am-u-sm-9 am-form-label">
									<p class="am-text-primary"><span class="am-icon-check"></span> 开放注册</p>
								</div>
								#else
								<div class="am-u-sm-9 am-form-label">
									<p class="am-text-danger"><span class="am-icon-close"></span> 禁止注册</p>
								</div>
								#end
							</div>
							<div class="am-form-group btn">
								<div class="am-u-sm-9 am-u-sm-push-3">
									#if(resigter.r_flag!=1)
									<input class="am-btn am-btn-primary open" value="开启注册" type="button">
									#else
									<input class="am-btn am-btn-danger close" value="关闭注册" type="button">
									#end
									<input id="addRole" onclick="aaa()" class="am-btn am-btn-success aaa" value="关闭窗口" type="button">
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
		<script type="text/javascript" src="/static/js/backstage/jquery-1.8.3.js"></script>
	<script>

			function aaa(){
    			$(".btnclosepanel", window.parent.document).click();//关闭窗口
  			}
					//alert("心累啊..");

			$(".btn .open").click(function(){
				$.ajax({
                        url:"/backstage/doRegSetting/1",
                        dataType:"json",
                        type:"put",
                        success:function(result){
                           	alert("注册开启。");
							window.location.href=location.href;
                        },
                        error:function(result){
                            alert("系统繁忙！");
                         }
                    });
			});
			$(".btn .close").click(function(){
				$.ajax({
					url:"/backstage/doRegSetting/0",
					dataType:"json",
					type:"put",
					success:function(result){
						alert("注册关闭。");
						window.location.href=location.href;
					},
					error:function(result){
						alert("系统繁忙！");
					 }
				});
			});

	</script>
	</body>
</html>
